<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../common.jsp" %>
<script type="text/javascript" src="${ctx}/static/js/user.js"></script>
<script type="text/javascript" src="${ctx}/static/js/userRole.js"></script>


<div id="dg_user_toolbar">
    <div style="padding: 10px;">
        <form id="searUserParams">
            <label for="user.id">ID:</label><input class="easyui-validatebox" type="text" name="user.id"/>
            <label for="user.nick">昵称:</label><input class="easyui-validatebox" type="text" name="user.nick"/>
            <label for="user.account">账户:</label><input class="easyui-validatebox" type="text" name="user.account"/>
        </form>
    </div>
    <span onclick="searchUser()" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</span>
    <span onclick="addUser()" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true">新增</span>
    <span onclick="updateUser()" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true">修改</span>
    <span onclick="removeUser()" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true">删除</span>
</div>

<div class="easyui-layout" fit="true">
    <div data-options="region:'center',split:true" title="用户列表" style="width:60%;position: static;">
            <table class="easyui-datagrid" id="dg_user"
                   data-options="url:'${ctx}/sys/user_searchPage',fit:true,fitColumns:true,singleSelect:true,pagination:true,pageSize:10,toolbar:'#dg_user_toolbar',onSelect:onSelectDgUser">
                <thead>
                <tr>
                    <th data-options="field:'id',width:150">ID</th>
                    <th data-options="field:'nick',width:150">昵称</th>
                    <th data-options="field:'account',width:150">账户</th>
                    <th data-options="field:'pwd',width:150">密码</th>
                </tr>
                </thead>
            </table>

    </div>
    <%--  右侧角色菜单分配区域 BEGIN --%>
    <div data-options="region:'east',split:true" title="授予角色" style="width:40%;position: static;">
        <ul style="list-style:none" id="userRoleTab">
        </ul>
    </div>
    <%--  右侧角色菜单分配区域 END --%>
    </div>

<div id="dl_user_edit" class="easyui-dialog" closed="true" title="编辑菜单" style="width:400px;height:400px; padding: 10px"
     data-options="resizable:true,modal:true,buttons:'#tb_user_edit'">
    <form id="form_user_edit" method="post">
        <div class="mb10">
            <label for="user.id">ID:</label>
            <input class="easyui-validatebox" type="text" name="user.id" data-options="required:true"/>
        </div>
        <div class="mb10">
            <label for="user.nick">昵称:</label>
            <input class="easyui-validatebox" type="text" name="user.name" data-options="required:true"/>
        </div>
        <div class="mb10">
            <label for="user.account">账户:</label>
            <input class="easyui-validatebox" type="text" name="user.height" data-options=""/>
        </div>
        <div class="mb10">
            <label for="user.pwd">密码:</label>
            <input class="easyui-validatebox" type="text" name="user.weight" data-options=""/>
        </div>


    </form>
    <div id="tb_user_edit">
        <span onclick="submitUser()" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true">提交</span>
        <span onclick="closeEdit()" class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true">取消</span>
    </div>
</div>



